<!DOCTYPE html>
<html lang="zh-cmn-Hans">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
  <!-- Set render engine for 360 browser -->
  <meta name="renderer" content="webkit" />
  <!-- No Baidu Siteapp-->
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon" />
  <link rel="icon" type="image/png" href="/img/app-icon72x72.png" />
  <!-- Add to homescreen for Chrome on Android -->
  <meta name="mobile-web-app-capable" content="yes" />
  <link rel="icon" sizes="192x192" href="/img/app-icon72x72@2x.png" />
  <!-- Add to homescreen for Safari on iOS -->
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  <meta name="apple-mobile-web-app-title" content="标题" />
  <link rel="apple-touch-icon-precomposed" href="/img/app-icon72x72@2x.png" />
  <!-- Tile icon for Win8 (144x144 + tile color) -->
  <meta name="msapplication-TileImage" content="/img/app-icon72x72@2x.png" />
  <meta name="msapplication-TileColor" content="#0e90d2" />
  <meta name="viewport" content="width=1200, user-scalable=yes">
  <title>网上展厅</title>
  <meta name="description" content="" />
  <meta name="keywords" content="" />
  <!-- /meta -->
  <script
    src="https://wenhuabu-media.bj.bcebos.com/front-end-engineer/Intangible-heritage/static/js/xianwenhauyun/pace.min.js"></script>
  <link
    href="https://wenhuabu-media.bj.bcebos.com/front-end-engineer/Intangible-heritage/static/js/xianwenhauyun/pace-theme-minimal.min.css"
    rel="stylesheet">
  <!--[if lte IE 9]>
  <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
  <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
  <!--[if gt IE 9]><!-->
  <script
    src="https://wenhuabu-media.bj.bcebos.com/front-end-engineer/Intangible-heritage/static/js/xianwenhauyun/jquery.3.3.1min.js"></script>
  <!--<![endif]-->
  <!-- /script -->

  <link rel="stylesheet" href="/css/main.min.css">

  <!-- /style -->
</head>

<body>

  <div class="page web-train">


    <section class="common_header_item">

      <header class="page__header">
      </header>

      <article class="section page__main_nav">
        <div class="section__wrapper" style="width: 1220px;">
          <div class="column-inner clearfix">
            <nav class="page__nav bar__inner j_follow_bar_nav">
              <li class="nav__item" data-nav="index"><span class="nav__title"><a href="index.html">首页</a></span>
              </li>
              <li class="nav__item" data-nav="news"><span class="nav__title"><a href="news.html">新闻资讯</a></span>
              </li>
              <li class="nav__item" data-nav="live"><span class="nav__title"><a href="live.html">资源点播</a></span>
              </li>
              <!-- <li class="nav__item" data-nav="ancient"><span class="nav__title"><a href="ancient-culture.html ">文化活动</a></span></li> -->
              <li class="nav__item" data-nav="activity"><span class="nav__title"><a href="activity.html">文化活动</a></span>
              </li>
              <li class="nav__item" data-nav="venue"><span class="nav__title"><a href="venue.html">场馆导航</a></span>
              </li>
              <li class="nav__item" data-nav="network"><span class="nav__title"><a
                    href="network-train.html">网络培训</a></span>
              </li>
              <!-- <li class="nav__item" data-nav="travel"><span class="nav__title"><a href="culture-travel.html">文化旅游</a></span></li> -->
              <!-- <li class="nav__item" data-nav="heritage"><span class="nav__title"><a href="culture-heritage.html ">文化非遗</a></span></li> -->
              <!-- <li class="nav__item" data-nav="volunteer"><span class="nav__title"><a href="volunteer-event-archive.html">志愿服务</a></span></li> -->
              <!-- <li class="nav__item" data-nav="app"><span class="nav__title"><a href="#">社团管理</a></span></li> -->
              <li class="nav__item" data-nav="exhibition"><span class="nav__title"><a
                    href="exhibition-list.html">网上展厅</a></span>
              </li>
              <span class="follow__bar"></span>
            </nav>
          </div>
        </div>
      </article>
    </section>
    <!-- /header -->
    <main class="page__container">
      <div class="network-banner">
        <img src="http://via.placeholder.com/1920x304" width="100%" alt="">
      </div>
      <section class="section section__breadcrumb">
        <div class="section__wrapper">
          <div class="pure-u-1">
            <div class="column-inner">
              <div class="nav__breadcrumb">
                <a class="item" href="index.html">首页</a>
                <span class="separator">&gt;</span>
                <a class="item active" href="javascript:void(0)">网上展厅</a>
              </div>
            </div>
          </div>
        </div>
      </section>
      <!-- / breadcrumb -->
      <!-- 分类 -->
      <section class="section">
        <div class="section__wrapper">
          <div class="section__container">
            <div class="module-filter-wrapper">
              <div class="module module-filter" id="">
                <h3 class="title"><i class="iconfont icon-activity-fill"></i>作品类型 :</h3>
                <div class="module-filter-list" id="breadType">
                  <!-- <a class="item active" data-filter="activity-channel-1" href="#">全部</a>
                  <a class="item" data-filter="activity-channel-2" href="#">最新发布</a>
                  <a class="item" data-filter="activity-channel-3" href="#">人气最高</a> -->
                </div>
              </div>
              <div class="module module-filter">
                <h3 class="title"><i class="iconfont icon-activity-fill"></i>智能排序 :</h3>
                <div class="module-filter-list" id="breadSort">
                  <a class="item active" data-typeid="1" data-filter="activity-channel-1" href="#">默认排序</a>
                  <a class="item" data-typeid="1" data-filter="activity-channel-2" href="#">最新发布</a>
                  <a class="item" data-typeid="0" data-filter="activity-channel-3" href="#">人气最高</a>
                </div>
              </div>
            </div>
          </div>
        </div>
      </section>
      <!-- 列表内容 -->
      <section class="section">
        <div class="section__wrapper">
          <div class="section__container">
            <div class="module media-list" id="list">
              <!-- 数据渲染 -->
            </div>
          </div>
        </div>
      </section>
      <nav class="page-pagination" aria-label="page-pagination" id="pages">

      </nav>
      <!-- / pagination -->
    </main>
    <!-- / container -->

    <footer class="page__footer">

    </footer>
    <!-- / footer -->

    <!-- / pendant -->
  </div>
  <!-- /page -->



  <script
    src="https://culturetv.hanyastar.com.cn/national_culture_file/pcjs/underscore-min-1.8.3/underscore-min.js"></script>
  <script
    src="https://wenhuabu-media.bj.bcebos.com/front-end-engineer/Intangible-heritage/static/js/xianwenhauyun/bowser.min.js"></script>
  <script
    src="https://wenhuabu-media.bj.bcebos.com/front-end-engineer/Intangible-heritage/static/js/xianwenhauyun/swiper3.4.2.jquery.min.js"></script>
  <link
    href="https://wenhuabu-media.bj.bcebos.com/front-end-engineer/Intangible-heritage/static/js/xianwenhauyun/swiper3.4.2.min.css"
    rel="stylesheet">
  <script src="https://culturetv.hanyastar.com.cn/national_culture_file/pcjs/layer-3.0.3/layer.min.js"></script>



  <!-- 前端交互脚本 -->
  <script src="js/common/xtab.js"></script>
  <script src="js/common/xbar.js"></script>
  <script src="js/common/util.js"></script>

  <script src="js/app.js"></script>
  <script src="js/common.min.js"></script>

  <script src="js/common.js"></script>
  <script src="js/page-header.js"></script>
  <script src="js/page-footer.js"></script>
  <script src="js/util/page-helper.js"></script>

  <script src="js/common/gb2260.js"></script>
  <script src="js/common/hs-area.js"></script>
  <!-- /script -->
  <script>
    var parms = {
      //你的参数
      'catId': 100055,
      // 'resType': 'activity',
      'order': 1,
      'pageSize': 2,//每页条数
      'pageNumber': 1,//页码
    }
    var pageParms = {//根据这个来显示
      'currPage': 1,//当前页码
      'total': 30,//总条数
      'totalPage': 6,//总页码
      'pageSize': 5//每页条数
    }

    initCategoryList("#breadType", {
      'pid': parms.catId
    }, (data) => {
      var list = data.data;
      var breadTypeHtml = '';
      var count = 1;
      breadTypeHtml += '<a class="item ' + (parms.catId == 100055 ? 'active' : '') + '" data-filter="activity-channel-' + count + '" data-typeid="0" href="#">全部</a>';
      $(list).each(function (index, item) {
        count++;
        breadTypeHtml += '<a class="item  ' + (parms.catId == item.id ? 'active' : '') + '" data-filter="activity-channel-' + count + '" data-typeid="' + item.id + '" href="#">' + item.name + '</a>';
      })
      return breadTypeHtml;
    })

    $('#breadType').on('click', 'a', function (e) {
      var $this = $(this);
      dataTypeid = $this.attr("data-typeid");
      parms.catId = dataTypeid;
      loadHtml()
    })

    $('#breadSort').on('click', 'a', function (e) {
      var $this = $(this);
      dataTypeid = $this.attr("data-typeid");
      parms.order = dataTypeid;
      loadHtml()
    })

    loadHtml()
    function loadHtml() {
      $.post(urlPath + "api/res/list", parms, function (data) {
        pageParms.currPage = data.currPage;
        pageParms.pageSize = data.pageSize;
        pageParms.totalPage = data.totalPage;
        pageParms.total = data.total;
        page(pageParms, "pages")
        //你要渲染的页面
        initPubResList("#list", parms, (data) => {
          var html = '';
          var list = data.data;
          $(list).each((index, item) => {
            html += '<div class="pure-u-1-4">' +
              '<div class="column-inner">' +
              '<div class="media media__type_01 media__bdtype_01 media-bg-white media-normal media-card">' +
              '<a class="object" href="exhibition-detail.html?pubId=' + item.pubId + '">' +
              '<img class="" src="' + item.poster + '" width="280" height="170" alt="">' +
              '</a>' +
              '<div class="caption">' +
              '<p>' + item.title + '</p>' +
              '<i class="iconfont">&#xe62e;</i>' + item.accessNum +
              '</div></div></div></div>';
          })
          return html;
        })
      })
    }



    onPage("pages", pageParms, parms, loadHtml);

    $(document).ready(function () {
      // 过滤标签交互效果
      var myUtil = hs.util;
      myUtil.itemActive({
        parent: ".module-filter-list",
        item: '.item',
        active: 'active'
      });
      // 过滤标签没有加链接就阻止#跳转
      $('.module-filter-list').on('click', '.item', function (e) {
        var $this = $(this);
        if ($this.attr('href') === "#") {
          e.preventDefault();
        }
      });


      // 地址联动操作
      var myArea = new hs.area({
        activeProvinceCode: "450000",
        //activePrefectureCode: "450100"
        //or: activeCountyCode: "130303"
      });
      myArea.init();

      $('.j_select_area_submit').on('click', function () {
        $('[data-area-filter="all"]').removeClass('active');
      });

      $('[data-area-filter="all"]').on('click', function () {
        // do something
      });

      //模拟ajax
      // function ListDate(obj, sql, num) {
      //   var tpl = "";
      //   for (var i = 0; i < num; i++) {
      //     tpl += $('#' + sql).html();
      //   }
      //   $('.' + obj).append(tpl);
      // }
      // ListDate('media-list', 'tplTeml', 16);

    });
  </script>
</body>

</html>